import { defineStore } from "pinia";
import { ref } from "vue";

export const userUserInfoStore = defineStore('userInfo', ()=>{

    // 定义状态相关的内容
    const info = ref();
    function setInfo(newInfo){
        info.value = newInfo;
    }

    function showInfo(){
        console.log(info);
    }
    function removeInfo(){
        info.value = {}
    }

    return {info, setInfo, removeInfo, showInfo}

},{
    persist:true
})

export default userUserInfoStore;
